{"ast":null,"code":"import { useEffect, useRef } from 'react';\nimport useForceUpdate from '../../_util/hooks/useForceUpdate';\nimport useResponsiveObserver from '../../_util/responsiveObserver';\nfunction useBreakpoint() {\n  let refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n  const screensRef = useRef({});\n  const forceUpdate = useForceUpdate();\n  const responsiveObserver = useResponsiveObserver();\n  useEffect(() => {\n    const token = responsiveObserver.subscribe(supportScreens => {\n      screensRef.current = supportScreens;\n      if (refreshOnChange) {\n        forceUpdate();\n      }\n    });\n    return () => responsiveObserver.unsubscribe(token);\n  }, []);\n  return screensRef.current;\n}\nexport default useBreakpoint;","map":{"version":3,"names":["useEffect","useRef","useForceUpdate","useResponsiveObserver","useBreakpoint","refreshOnChange","arguments","length","undefined","screensRef","forceUpdate","responsiveObserver","token","subscribe","supportScreens","current","unsubscribe"],"sources":["/data/messenger.client/node_modules/antd/es/grid/hooks/useBreakpoint.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport useForceUpdate from '../../_util/hooks/useForceUpdate';\nimport useResponsiveObserver from '../../_util/responsiveObserver';\nfunction useBreakpoint() {\n  let refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n  const screensRef = useRef({});\n  const forceUpdate = useForceUpdate();\n  const responsiveObserver = useResponsiveObserver();\n  useEffect(() => {\n    const token = responsiveObserver.subscribe(supportScreens => {\n      screensRef.current = supportScreens;\n      if (refreshOnChange) {\n        forceUpdate();\n      }\n    });\n    return () => responsiveObserver.unsubscribe(token);\n  }, []);\n  return screensRef.current;\n}\nexport default useBreakpoint;"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,OAAOC,cAAc,MAAM,kCAAkC;AAC7D,OAAOC,qBAAqB,MAAM,gCAAgC;AAClE,SAASC,aAAa,GAAG;EACvB,IAAIC,eAAe,GAAGC,SAAS,CAACC,MAAM,GAAG,CAAC,IAAID,SAAS,CAAC,CAAC,CAAC,KAAKE,SAAS,GAAGF,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;EAC9F,MAAMG,UAAU,GAAGR,MAAM,CAAC,CAAC,CAAC,CAAC;EAC7B,MAAMS,WAAW,GAAGR,cAAc,EAAE;EACpC,MAAMS,kBAAkB,GAAGR,qBAAqB,EAAE;EAClDH,SAAS,CAAC,MAAM;IACd,MAAMY,KAAK,GAAGD,kBAAkB,CAACE,SAAS,CAACC,cAAc,IAAI;MAC3DL,UAAU,CAACM,OAAO,GAAGD,cAAc;MACnC,IAAIT,eAAe,EAAE;QACnBK,WAAW,EAAE;MACf;IACF,CAAC,CAAC;IACF,OAAO,MAAMC,kBAAkB,CAACK,WAAW,CAACJ,KAAK,CAAC;EACpD,CAAC,EAAE,EAAE,CAAC;EACN,OAAOH,UAAU,CAACM,OAAO;AAC3B;AACA,eAAeX,aAAa"},"metadata":{},"sourceType":"module"}